package com.yonyou.base.common.utils;

import java.util.UUID;


/**
 * UUID工具类
 *
 * @author Sun
 * @version 1.0 2014年5月7日
 * @since 1.7
 */
public class UUIDUtils {

    /**
     * 取得uuid
     *
     * @return uuid串
     */
    public static String getRandomUUID() {
        String uuid = UUID.randomUUID().toString();
        StringBuilder uuid32 = new StringBuilder();
        uuid32.append(uuid.substring(0, 8))
                .append(uuid.substring(9, 13))
                .append(uuid.substring(14, 18))
                .append(uuid.substring(19, 23))
                .append(uuid.substring(24));
        return uuid32.toString();
    }
}
